package cn.edu.scau.cmi.dengzejun.chapter05;

public class Village {
	static int treeAmount;
	int peopleNumber;
	String name;
	Village(String s){
		name=s;
		return;
	}
	
	void TreePlanting(int n) {
		treeAmount+=n;
		System.out.println(name+" planted "+n);
		return;
	}
	
	void FellTree(int n) {
		if (treeAmount-n>=0) {
			treeAmount-=n;
			System.out.println(name+" are cut down "+n);
		}else {
			System.out.println("No trees to cut down!");
		}
		return;
	}
	
	static int LookTreeAmount() {
		return treeAmount;
	}
	
	void AddPeopleNumber(int n) {
		peopleNumber+=n;
		System.out.println(name+" increase "+n);
		return;
	}
}
